<template>
  <div style="padding: 20px 0;">
    <a-form
      :model="formState"
      layout="inline"
      :label-col="labelCol"
      @finish="onFinish"
      @finishFailed="onFinishFailed"
    >
      <a-divider orientation="left" style="font-weight: 900"
        >会员信息</a-divider
      >
      <a-form-item
        label="用户姓名"
        name="username"
        :rules="[{ required: true, message: 'Please input your username!' }]"
      >
        <a-input v-model:value="formState.username" style="width: 20vw;" />
      </a-form-item>
      <a-form-item
        label="手机号"
        name="mobile"
        :rules="[{ required: true, message: 'Please input your username!' }]"
      >
        <a-input v-model:value="formState.mobile" style="width: 20vw;" />
      </a-form-item>

      <a-form-item
        label="密码"
        name="password"
        :rules="[{ required: true, message: 'Please input your password!' }]"
      >
        <a-input-password
          v-model:value="formState.password"
          style="width: 20vw"
        />
      </a-form-item>
      <a-divider orientation="left" style="font-weight: 900">简历信息</a-divider>
      <a-form-item
        label="姓名"
        name="name"
        :rules="[{ required: true, message: 'Please input your username!' }]"
      >
        <a-input v-model:value="formState.name" style="width: 20vw;" />
      </a-form-item>
      <a-form-item 
        label="性别" 
        name="sex"
        :rules="[{ required: true, message: 'Please input your username!' }]"
        >
            <a-radio-group v-model:value="formState.sex">
                <a-radio value="男">男</a-radio>
                <a-radio value="女">女</a-radio>
                <a-radio value="保密">保密</a-radio>
            </a-radio-group>
        </a-form-item>
        <a-form-item 
            name="birthday" 
            label="出生日期" 
            :rules="[{ required: true, message: 'Please input your username!' }]"
        >
            <a-date-picker v-model:value="formState.birthday" value-format="YYYY-MM-DD"  style="width: 20vw;" />
        </a-form-item>
        <a-form-item
            name="education"
            label="最高学历"
            has-feedback
            :rules="[{ required: true, message: 'Please select your country!' }]"
        >
            <a-select v-model:value="formState.education" placeholder="Please select a country" style="width: 20vw;" >
                <a-select-option value="初中">初中</a-select-option>
                <a-select-option value="高中">高中</a-select-option>
                <a-select-option value="中技">中技</a-select-option>
                <a-select-option value="中专">中专</a-select-option>
                <a-select-option value="大专">大专</a-select-option>
                <a-select-option value="本科">本科</a-select-option>
                <a-select-option value="硕士">硕士</a-select-option>
                <a-select-option value="博士">博士</a-select-option>
                <a-select-option value="博士后">博士后</a-select-option>
            </a-select>
        </a-form-item>
        <a-form-item 
            name="working" 
            label="参加工作时间" 
        >
            <a-date-picker :disabled="checked" v-model:value="formState.working" value-format="YYYY-MM-DD"  style="width: 11vw;" />
            <a-checkbox @change="setchecked()" style="font-size: 0.01rem;margin-left: 10px;">应届生/无经验</a-checkbox>
        </a-form-item>
        <a-form-item
            name="status_job"
            label="求职状态"
            has-feedback
            :rules="[{ required: true, message: 'Please select your country!' }]"
        >
            <a-select v-model:value="formState.status_job" placeholder="Please select a country" style="width: 20vw;" >
                <a-select-option value="我目前已离职/可快速到岗">我目前已离职/可快速到岗</a-select-option>
                <a-select-option value="我目前在职/但考虑换个新环境">我目前在职/但考虑换个新环境</a-select-option>
                <a-select-option value="观望有好的机会再考虑">观望有好的机会再考虑</a-select-option>
                <a-select-option value="目前暂无跳槽打算">目前暂无跳槽打算</a-select-option>
                <a-select-option value="应届毕业生">应届毕业生</a-select-option>
            </a-select>
        </a-form-item>
        <a-form-item 
            label="婚姻状况" 
            name="marital"
        >
            <a-radio-group v-model:value="formState.marital">
                <a-radio value="保密">保密</a-radio>
                <a-radio value="未婚">未婚</a-radio>
                <a-radio value="已婚">已婚</a-radio>
            </a-radio-group>
        </a-form-item>
        <a-form-item
        label="现居住地"
        name="current_address"
        :rules="[{ required: true, message: 'Please input your username!' }]"
      >
        <a-input v-model:value="formState.current_address" style="width: 20vw;" />
      </a-form-item>
      <a-form-item
        label="所学专业"
        name="major"
      >
        <a-cascader v-model:value="formState.major" :options="options1" placeholder="Please select" style="width: 20vw;" />
      </a-form-item>
      <a-form-item
        label="身高"
        name="stature"
      >
        <a-input v-model:value="formState.stature" style="width: 20vw;" />
      </a-form-item>
      <a-form-item
        label="籍贯"
        name="native"
        :rules="[{ required: true, message: 'Please input your username!' }]"
      >
        <a-input v-model:value="formState.native" style="width: 20vw;" />
      </a-form-item>
      <a-form-item
        label="身份证号"
        name="id_number"
      >
        <a-input v-model:value="formState.id_number" style="width: 20vw;" />
      </a-form-item>
      <a-form-item
        label="照片"
        name="user_img"
      >
      <a-upload
            v-model:file-list="fileList"
            name="avatar"
            list-type="picture-card"
            class="avatar-uploader"
            :show-upload-list="false"
            action="/api/upload"
            :before-upload="beforeUpload"
            @change="handleChange"
        >
            <img v-if="imageUrl" :src="imageUrl" alt="avatar" style="height: 100px;" />
            <div v-else>
            <loading-outlined v-if="loading"></loading-outlined>
            <plus-outlined v-else></plus-outlined>
            <div class="ant-upload-text">Upload</div>
            </div>
        </a-upload>
      </a-form-item>
        <a-divider orientation="left" style="font-weight: 900">求职意向</a-divider>
        <a-form-item 
            label="工作性质" 
            name="job_nature"
            :rules="[{ required: true, message: 'Please input your username!' }]"
        >
            <a-radio-group v-model:value="formState.job_nature">
                <a-radio value="全职">全职</a-radio>
                <a-radio value="兼职">兼职</a-radio>
                <a-radio value="实习">实习</a-radio>
            </a-radio-group>
        </a-form-item>
        <a-form-item 
            label="意向职位" 
            name="desired"
            :rules="[{ required: true, message: 'Please input your username!' }]"
        >
            <a-cascader v-model:value="formState.desired" :options="options2" placeholder="Please select" style="width: 20vw;" />
        </a-form-item>
        <a-form-item 
            label="工作地区" 
            name="work_address"
            :rules="[{ required: true, message: 'Please input your username!' }]"
        >
            <a-cascader
                v-model:value="formState.work_address"
                :options="options3"
                placeholder="Please select"
                change-on-select
            />
        </a-form-item>
        <a-form-item 
            label="期望薪资" 
            name="salary1"
            :rules="[{ required: true, message: 'Please input your username!' }]"
        >
            <a-select
                v-model:value="formState.salary1"
                style="width: 125px"
                :options="options4"
            />
            <span>-</span>
            <a-select
                v-model:value="formState.salary2"
                style="width: 125px"
                :options="options5"
            />
        </a-form-item>
        <a-form-item 
            label="期望行业" 
            name="industry"
        >
            <a-cascader
                v-model:value="formState.industry"
                :options="options6"
                placeholder="Please select"
                change-on-select
            />
        </a-form-item>
        <a-divider orientation="left" style="font-weight: 900">联系信息</a-divider>
        <a-form-item
            label="手机号"
            name="mobile"
        >
            <a-input v-model:value="formState.mobile" style="width: 20vw;" />
        </a-form-item>
        <a-form-item
            label="微信"
            name="wechat"
            :rules="[{ required: true, message: 'Please input your username!' }]"
        >
            <a-input v-model:value="formState.wechat" style="width: 20vw;" />
        </a-form-item>
        <a-form-item
            label="邮箱"
            name="mailbox"
            :rules="[{ required: true, message: 'Please input your username!' }]"
        >
            <a-input v-model:value="formState.mailbox" style="width: 20vw;" />
        </a-form-item>
        <a-form-item
            label="QQ"
            name="qq"
        >
            <a-input v-model:value="formState.qq" style="width: 20vw;" />
        </a-form-item>
        <a-form-item
            :wrapper-col="{ offset: 8, span: 16 }"
        >
            <a-button type="primary" html-type="submit" @click="addjianlis()">保存</a-button>
        </a-form-item>
    </a-form>
  </div>
</template>

<script setup>
import { toRefs, reactive, ref } from "vue";
import { message } from "ant-design-vue";
import {addjianli} from '../../../api/jianli'
import { useRouter } from "vue-router";

const router = useRouter()
let checked = ref(false)
const fileList = ref([]);
const loading = ref(false);
const imageUrl = ref('https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2Ff%2F57a42b9002e19.jpg&refer=http%3A%2F%2Fpic1.win4000.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1673271689&t=66c1a2094a56e81b480679b334be3ddd');
let { formState, labelCol,options1,options2,options3,options4,options5,options6 } = toRefs(
  reactive({
    formState: {
      username:'admins1',
      mobile:'18236083666',
      password:'123456',
      name:'小王',
      sex:'男',
      birthday:'',
      education:'大专',
      working:'',
      status_job:'应届毕业生',
      marital:'未婚',
      current_address:'河南濮阳',
      major:'',
      stature:'175',
      native:'河南濮阳清丰',
      id_number:'xxxxxxxxxxxxxxxxxx',
      user_img:'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2Ff%2F57a42b9002e19.jpg&refer=http%3A%2F%2Fpic1.win4000.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1673271689&t=66c1a2094a56e81b480679b334be3ddd',
      job_nature:'全职',
      desired:'',
      work_address:'',
      salary1:'',
      salary2:'',
      industry:'',
      wechat:'xxxxxxx',
      mailbox:'xxxxxxx',
      qq:'2899835244',
    },
    labelCol: {
      style: {
        width: "180px",
      },
    },
    options1:[
        {
            value: '工科类',
            label: '工科类',
            children: [
              {
                value: '电气信息类',
                label: '电气信息类',
              },
              {
                value: '地矿类',
                label: '地矿类',
              },
              {
                value: '材料类',
                label: '材料类',
              },
              {
                value: '机械类',
                label: '机械类',
              },
            ],
        },
        {
            value: '理科类',
            label: '理科类',
            children: [
              {
                value: '数学类',
                label: '数学类',
              },
              {
                value: '物理学类',
                label: '物理学类',
              },
              {
                value: '化学类',
                label: '化学类',
              },
              {
                value: '生物科学类',
                label: '生物科学类',
              },
              {
                value: '天文类',
                label: '天文类',
              },
            ],
        },
        {
            value: '农学类',
            label: '农学类',
            children: [
              {
                value: '植物生产类',
                label: '植物生产类',
              },
              {
                value: '草业科学类',
                label: '草业科学类',
              },
              {
                value: '森林资源类',
                label: '森林资源类',
              },
              {
                value: '环境生态类',
                label: '环境生态类',
              },
              {
                value: '动物生产类',
                label: '动物生产类',
              },
            ],
        },
        {
            value: '医学类',
            label: '医学类',
            children: [
              {
                value: '基础医学类',
                label: '基础医学类',
              },
              {
                value: '预防医学类',
                label: '预防医学类',
              },
              {
                value: '临床医学与医学技术类',
                label: '临床医学与医学技术类',
              },
              {
                value: '口腔医学类',
                label: '口腔医学类',
              },
              {
                value: '中医学类',
                label: '中医学类',
              },
            ],
        },
        {
            value: '管理学',
            label: '管理学',
            children: [
              {
                value: '管理科学与工程类',
                label: '管理科学与工程类',
              },
              {
                value: '工商管理类',
                label: '工商管理类',
              },
              {
                value: '公共管理类',
                label: '公共管理类',
              },
              {
                value: '农业经济管理类',
                label: '农业经济管理类',
              },
              {
                value: '图书档案学类',
                label: '图书档案学类',
              },
            ],
        },
    ],
    options2:[
        {
            value: '生活',
            label: '生活',
            children: [
              {
                value: '餐饮',
                label: '餐饮',
                children:[
                  {
                    value:'服务员',
                    label:'服务员',
                  },
                  {
                    value:'后厨',
                    label:'后厨',
                  },
                  {
                    value:'传菜员',
                    label:'传菜员',
                  },
                  {
                    value:'配菜/打荷',
                    label:'配菜/打荷',
                  },
                  {
                    value:'洗碗工',
                    label:'洗碗工',
                  },
                ]
              },
              {
                value: '家政保洁/安保',
                label: '家政保洁/安保',
                children: [
                  {
                    value: '保洁',
                    label: '保洁',
                  },
                  {
                    value: '保姆',
                    label: '保姆',
                  },
                  {
                    value: '月嫂',
                    label: '月嫂',
                  },
                  {
                    value: '育婴师/保育员',
                    label: '育婴师/保育员',
                  },
                  {
                    value: '洗衣工',
                    label: '洗衣工',
                  },
                ],
              },
              {
                value: '美容/美发',
                label: '美容/美发',
                children: [
                  {
                    value: '发型师',
                    label: '发型师',
                  },
                  {
                    value: '美发助理/学徒',
                    label: '美发助理/学徒',
                  },
                  {
                    value: '洗头工',
                    label: '洗头工',
                  },
                  {
                    value: '美容导师',
                    label: '美容导师',
                  },
                  {
                    value: '美容师',
                    label: '美容师',
                  },
                ],
              },
              {
                value: '酒店/旅游',
                label: '酒店/旅游',
                children: [
                  {
                    value: '酒店前台',
                    label: '酒店前台',
                  },
                  {
                    value: '客房服务员',
                    label: '客房服务员',
                  },
                  {
                    value: '楼面经理',
                    label: '楼面经理',
                  },
                  {
                    value: '行李员',
                    label: '行李员',
                  },
                  {
                    value: '救生员',
                    label: '救生员',
                  },
                ],
              },
              {
                value: '娱乐/休闲',
                label: '娱乐/休闲',
                children: [
                  {
                    value: '酒吧服务员',
                    label: '酒吧服务员',
                  },
                  {
                    value: '娱乐厅服务员',
                    label: '娱乐厅服务员',
                  },
                  {
                    value: '礼仪/迎宾',
                    label: '礼仪/迎宾',
                  },
                  {
                    value: '主持人',
                    label: '主持人',
                  },
                  {
                    value: '调酒师',
                    label: '调酒师',
                  },
                ],
              },
              {
                value: '保健按摩',
                label: '保健按摩',
                children: [
                  {
                    value: '按摩师',
                    label: '按摩师',
                  },
                  {
                    value: '足疗师',
                    label: '足疗师',
                  },
                  {
                    value: '搓澡工',
                    label: '搓澡工',
                  },
                  {
                    value: '针灸推拿',
                    label: '针灸推拿',
                  }
                ],
              }
            ],
        },
        {
            value: '人力 | 行政 | 管理',
            label: '人力 | 行政 | 管理',
            children: [
              {
                value: '人力/行政/后勤',
                label: '人力/行政/后勤',
                children:[
                  {
                    value:'文员',
                    label:'文员',
                  },
                  {
                    value:'前台/总机/接待',
                    label:'前台/总机/接待',
                  },
                  {
                    value:'人事专员/助理',
                    label:'人事专员/助理',
                  },
                  {
                    value:'人事经理/主管',
                    label:'人事经理/主管',
                  },
                  {
                    value:'人事总监',
                    label:'人事总监',
                  },
                ]
              },
              {
                value: '司机',
                label: '司机',
                children: [
                  {
                    value: '商务司机',
                    label: '商务司机',
                  },
                  {
                    value: '客运司机',
                    label: '客运司机',
                  },
                  {
                    value: '货运司机',
                    label: '货运司机',
                  },
                  {
                    value: '出租车司机',
                    label: '出租车司机',
                  },
                  {
                    value: '班车司机',
                    label: '班车司机',
                  },
                ],
              },
              {
                value: '高级管理',
                label: '高级管理',
                children: [
                  {
                    value: 'CEO/总裁/总经理',
                    label: 'CEO/总裁/总经理',
                  },
                  {
                    value: '首席运营官COO',
                    label: '首席运营官COO',
                  },
                  {
                    value: '首席财务官CFO',
                    label: '首席财务官CFO',
                  },
                  {
                    value: '首席技术官CTO',
                    label: '首席技术官CTO',
                  },
                  {
                    value: '副总裁/副总经理',
                    label: '副总裁/副总经理',
                  },
                ],
              },
            ],
        },
        {
            value: '销售 | 客服 | 采购 | 淘宝',
            label: '销售 | 客服 | 采购 | 淘宝',
            children: [
              {
                value: '销售',
                label: '销售',
                children:[
                  {
                    value:'销售代表',
                    label:'销售代表',
                  },
                  {
                    value:'销售助理',
                    label:'销售助理',
                  },
                  {
                    value:'销售经理/主管',
                    label:'销售经理/主管',
                  },
                  {
                    value:'销售总监',
                    label:'销售总监',
                  },
                  {
                    value:'电话销售',
                    label:'电话销售',
                  },
                ]
              },
              {
                value: '客服',
                label: '客服',
                children: [
                  {
                    value: '客服专员/助理',
                    label: '客服专员/助理',
                  },
                  {
                    value: '客服经理/主管',
                    label: '客服经理/主管',
                  },
                  {
                    value: '客服总监',
                    label: '客服总监',
                  },
                  {
                    value: '售前/售后服务',
                    label: '售前/售后服务',
                  },
                  {
                    value: '电话客服',
                    label: '电话客服',
                  },
                ],
              },
              {
                value: '贸易/采购',
                label: '贸易/采购',
                children: [
                  {
                    value: '外贸专员/助理',
                    label: '外贸专员/助理',
                  },
                  {
                    value: '外贸经理/主管',
                    label: '外贸经理/主管',
                  },
                  {
                    value: '采购员',
                    label: '采购员',
                  },
                  {
                    value: '采购助理',
                    label: '采购助理',
                  },
                  {
                    value: '采购经理/总监',
                    label: '采购经理/总监',
                  },
                  {
                    value: '报关员',
                    label: '报关员',
                  },
                  {
                    value: '商务专员/经理',
                    label: '商务专员/经理',
                  },
                  {
                    value: '买手',
                    label: '买手',
                  },
                ],
              },
            ],
        },
        {
            value: '市场 | 媒介 | 广告 | 设计',
            label: '市场 | 媒介 | 广告 | 设计',
            children: [
              {
                value: '市场/媒介/公关',
                label: '市场/媒介/公关',
                children:[
                  {
                    value:'市场专员/助理',
                    label:'市场专员/助理',
                  },
                  {
                    value:'市场经理/总监',
                    label:'市场经理/总监',
                  },
                  {
                    value:'市场拓展',
                    label:'市场拓展',
                  },
                  {
                    value:'市场调研',
                    label:'市场调研',
                  },
                  {
                    value:'市场策划',
                    label:'市场策划',
                  },
                  {
                    value:'媒介专员/助理',
                    label:'媒介专员/助理',
                  },
                ]
              },
              {
                value: '广告/会展/咨询',
                label: '广告/会展/咨询',
                children: [
                  {
                    value: '媒介策划/管理',
                    label: '媒介策划/管理',
                  },
                  {
                    value: '会展策划/设计',
                    label: '会展策划/设计',
                  },
                  {
                    value: '婚礼策划师',
                    label: '婚礼策划师',
                  },
                  {
                    value: '咨询顾问',
                    label: '咨询顾问',
                  },
                  {
                    value: '咨询经理/主管',
                    label: '咨询经理/主管',
                  },
                  {
                    value: '客户主管/专员',
                    label: '客户主管/专员',
                  },
                  {
                    value: '企业策划',
                    label: '企业策划',
                  },
                ],
              },
              {
                value: '美术/设计/创意',
                label: '美术/设计/创意',
                children: [
                  {
                    value: '工艺/珠宝设计',
                    label: '工艺/珠宝设计',
                  },
                  {
                    value: '多媒体/动画设计',
                    label: '多媒体/动画设计',
                  },
                  {
                    value: '产品/包装设计',
                    label: '产品/包装设计',
                  },
                  {
                    value: '装修装潢设计',
                    label: '装修装潢设计',
                  },
                  {
                    value: 'CAD设计/制图',
                    label: 'CAD设计/制图',
                  },
                ],
              },
            ],
        },
        {
            value: '生产 | 物流 | 质控 | 汽车',
            label: '生产 | 物流 | 质控 | 汽车',
            children: [
              {
                value: '普工/技工',
                label: '普工/技工',
                children:[
                  {
                    value:'普工',
                    label:'普工',
                  },
                  {
                    value:'综合维修工',
                    label:'综合维修工',
                  },
                  {
                    value:'制冷/水暖工',
                    label:'制冷/水暖工',
                  },
                  {
                    value:'电工',
                    label:'电工',
                  },
                  {
                    value:'木工',
                    label:'木工',
                  },
                  {
                    value:'钳工',
                    label:'钳工',
                  },
                  {
                    value:'切割/焊工',
                    label:'切割/焊工',
                  },
                ]
              },
              {
                value: '生产管理/研发',
                label: '生产管理/研发',
                children: [
                  {
                    value: '车间主任',
                    label: '车间主任',
                  },
                  {
                    value: '生产计划',
                    label: '生产计划',
                  },
                  {
                    value: '化验/检验',
                    label: '化验/检验',
                  },
                  {
                    value: '厂长/副厂长',
                    label: '厂长/副厂长',
                  },
                  {
                    value: '生产总监',
                    label: '生产总监',
                  },
                  {
                    value: '维修工程师',
                    label: '维修工程师',
                  },
                  {
                    value: '工业工程师',
                    label: '工业工程师',
                  },
                ],
              },
              {
                value: '物流/仓储',
                label: '物流/仓储',
                children: [
                  {
                    value: '仓库经理/主管',
                    label: '仓库经理/主管',
                  },
                  {
                    value: '装卸/搬运工',
                    label: '装卸/搬运工',
                  },
                  {
                    value: '供应链管理',
                    label: '供应链管理',
                  },
                  {
                    value: '单证员',
                    label: '单证员',
                  },
                  {
                    value: '国际运输',
                    label: '国际运输',
                  },
                ],
              },
              {
                value: '服装/纺织/食品',
                label: '服装/纺织/食品',
                children: [
                  {
                    value: '样衣工',
                    label: '样衣工',
                  },
                  {
                    value: '食品/饮料研发/检验',
                    label: '食品/饮料研发/检验',
                  },
                  {
                    value: '板房/底格出格师',
                    label: '板房/底格出格师',
                  },
                  {
                    value: '电脑放码员',
                    label: '电脑放码员',
                  },
                  {
                    value: '纸样师/车板工',
                    label: '纸样师/车板工',
                  },
                ],
              },
              {
                value: '质防/安防',
                label: '质防/安防',
                children: [
                  {
                    value: '质量管理/测试经理',
                    label: '质量管理/测试经理',
                  },
                  {
                    value: '测试工程师',
                    label: '测试工程师',
                  },
                  {
                    value: '安全消防',
                    label: '安全消防',
                  },
                  {
                    value: '认证工程师/审核员',
                    label: '认证工程师/审核员',
                  },
                  {
                    value: '安全管理',
                    label: '安全管理',
                  },
                ],
              },
            ],
        },
    ],
    options3:[
        {
            value: '北京',
            label: '北京',
            children: [
              {
                value: '海淀',
                label: '海淀',
                children:[
                  {
                    value:'西三环',
                    label:'西三环',
                  },
                  {
                    value:'北三环',
                    label:'北三环',
                  }
                ]
              }
            ],
        },
        {
            value: '上海',
            label: '上海',
            children: [
              {
                value: '嘉定',
                label: '嘉定',
                children:[
                  {
                    value:'新成公园',
                    label:'新成公园',
                  },
                  {
                    value:'上海师范',
                    label:'上海师范',
                  },
                ]
              }
            ],
        },
        {
            value: '广东',
            label: '广东',
            children: [
              {
                value: '广州',
                label: '广州',
                children:[
                  {
                    value:'海珠',
                    label:'海珠',
                  },
                  {
                    value:'黄埔',
                    label:'黄埔',
                  }
                ]
              }
            ]
        }
    ],
    options4:[
      {
        value: '500元/月',
        label: '500元/月',
      },
      {
        value: '1000元/月',
        label: '1000元/月',
      },
      {
        value: '1500元/月',
        label: '1500元/月',
      },
      {
        value: '2000元/月',
        label: '2000元/月',
      },
      {
        value: '2500元/月',
        label: '2500元/月',
      },
      {
        value: '3000元/月',
        label: '3000元/月',
      },
      {
        value: '3500元/月',
        label: '3500元/月',
      },
      {
        value: '4000元/月',
        label: '4000元/月',
      },
      {
        value: '4500元/月',
        label: '4500元/月',
      },
      {
        value: '5000元/月',
        label: '5000元/月',
      },
      {
        value: '5500元/月',
        label: '5500元/月',
      },
      {
        value: '6000元/月',
        label: '6000元/月',
      },
      {
        value: '6500元/月',
        label: '6500元/月',
      },
      {
        value: '7000元/月',
        label: '7000元/月',
      },
      {
        value: '7500元/月',
        label: '7500元/月',
      },
      {
        value: '8000元/月',
        label: '8000元/月',
      },
      {
        value: '8500元/月',
        label: '8500元/月',
      },
      {
        value: '9000元/月',
        label: '9000元/月',
      },
      {
        value: '9500元/月',
        label: '9500元/月',
      },
      {
        value: '10000元/月',
        label: '10000元/月',
      },
      {
        value: '10500元/月',
        label: '10500元/月',
      },
      {
        value: '11000元/月',
        label: '11000元/月',
      },
      {
        value: '11500元/月',
        label: '11500元/月',
      },
      {
        value: '12000元/月',
        label: '12000元/月',
      },
      {
        value: '12500元/月',
        label: '12500元/月',
      },
    ],
    options5:[
    {
        value: '500元/月',
        label: '500元/月',
      },
      {
        value: '1000元/月',
        label: '1000元/月',
      },
      {
        value: '1500元/月',
        label: '1500元/月',
      },
      {
        value: '2000元/月',
        label: '2000元/月',
      },
      {
        value: '2500元/月',
        label: '2500元/月',
      },
      {
        value: '3000元/月',
        label: '3000元/月',
      },
      {
        value: '3500元/月',
        label: '3500元/月',
      },
      {
        value: '4000元/月',
        label: '4000元/月',
      },
      {
        value: '4500元/月',
        label: '4500元/月',
      },
      {
        value: '5000元/月',
        label: '5000元/月',
      },
      {
        value: '5500元/月',
        label: '5500元/月',
      },
      {
        value: '6000元/月',
        label: '6000元/月',
      },
      {
        value: '6500元/月',
        label: '6500元/月',
      },
      {
        value: '7000元/月',
        label: '7000元/月',
      },
      {
        value: '7500元/月',
        label: '7500元/月',
      },
      {
        value: '8000元/月',
        label: '8000元/月',
      },
      {
        value: '8500元/月',
        label: '8500元/月',
      },
      {
        value: '9000元/月',
        label: '9000元/月',
      },
      {
        value: '9500元/月',
        label: '9500元/月',
      },
      {
        value: '10000元/月',
        label: '10000元/月',
      },
      {
        value: '10500元/月',
        label: '10500元/月',
      },
      {
        value: '11000元/月',
        label: '11000元/月',
      },
      {
        value: '11500元/月',
        label: '11500元/月',
      },
      {
        value: '12000元/月',
        label: '12000元/月',
      },
      {
        value: '12500元/月',
        label: '12500元/月',
      },
    ],
    options6:[
      {
        value: '计算机软件/硬件',
        label: '计算机软件/硬件',
      },
      {
        value: '计算机系统/维修',
        label: '计算机系统/维修',
      },
      {
        value: '通信(设备/运营/服务)',
        label: '通信(设备/运营/服务)',
      },
      {
        value: '互联网/电子商务',
        label: '互联网/电子商务',
      },
      {
        value: '网络游戏',
        label: '网络游戏',
      },
      {
        value: '电子/半导体/集成电路',
        label: '电子/半导体/集成电路',
      },
      {
        value: '仪器仪表/工业自动化',
        label: '仪器仪表/工业自动化',
      },
      {
        value: '会计/审计',
        label: '会计/审计',
      },
      {
        value: '金融(投资/证券)',
        label: '金融(投资/证券)',
      },
      {
        value: '金融(银行/保险)',
        label: '金融(银行/保险)',
      },
    ],
  })
);
const setchecked = ()=>{
    checked.value=!checked.value
    formState.working='无经验'
    console.log(checked.value);
}
const addjianlis = async()=>{
  let {data} = await addjianli(formState)
  // console.log(formState.value);
  router.push('/resume/resume_all')
  message.success('添加成功')
}
//头像
const handleChange = info => {
      if (info.file.status === 'uploading') {
        loading.value = true;
        return;
      }
      if (info.file.status === 'done') {
        // Get this url from response in real world.
        getBase64(info.file.originFileObj, base64Url => {
          imageUrl.value = base64Url;
          loading.value = false;
          console.log(base64Url);
        });
      }
      if (info.file.status === 'error') {
        loading.value = false;
        message.error('upload error');
      }
    };
    const beforeUpload = file => {
      const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
      if (!isJpgOrPng) {
        message.error('You can only upload JPG file!');
      }
      const isLt2M = file.size / 1024 / 1024 < 2;
      if (!isLt2M) {
        message.error('Image must smaller than 2MB!');
      }
      return isJpgOrPng && isLt2M;
    };
</script>

<style scoped>
.ant-row.ant-form-item{
    margin-top: 20px;
    width: 35vw;
}
</style>